<!DOCTYPE html>
	<html lang="en">
	<head>
		<meta charset="UTF-8">
		<meta name="viewport" content="width=device-width,initial-scale=1.0">
		<title>首页</title>
		<link rel="stylesheet" href="layui/css/layui.css">
		<link rel="stylesheet" type="text/css" href="css/footer.css">
		<link rel="stylesheet" type="text/css" href="css/style.css">
	</head>
	<body>
		<div class="select-s">
			<div>
				<div class="center select-t">
					<p>筛选</p>
					<span class="close">X</span>
				</div>
				<div class="select-b">
					<p>想看到的用户</p>
					<div class="sex">
						<div class="blue all">全部</div>
						<div class="s-girl"><img src="img/female-n.png">女</div>
						<div class="s-boy"><img src="img/male-n.png">男</div>
					</div>
					<div>
						<p>年龄范围</p>
					</div>
					<div class="slider"></div>
					<div class="sure center">确定</div>
				</div>
			</div>
		</div>
		<div class="issue">
			<ul class="flex">
		    		<li>
		    			<a href="html/i-party.html">
		    				<img src="img/party.png">
		    				<p>聚会约会</p>
		    			</a>
		    		</li>
		    		<li>
		    			<a href="html/i-travel.html">
			    			<img src="img/travel.png">
			    			<p>结伴旅游</p>
			    		</a>
		    		</li>
		    		<li>
		    			<a href="html/i-club.html">
			    			<img src="img/club.png">
			    			<p>推拿会所</p>
		    			</a>
		    		</li>
		    		<li>
		    			<a href="html/i-guide.html">
			    			<img src="img/guide.png">
			    			<p>同城导游</p>
		    			</a>
		    		</li>
		    	</ul>
		    	<div class="center issue-x"><img src="img/6d.png"></div>
		</div>
		<div style="position: fixed;width: 100%;top: 0;background:#fff;z-index: 98">
			<header class="center">
				<img src="img/beam.png">
			</header>
			<div class="flex nav" style="position: relative">
				<ul class="clearfix">
					<li class="current">附近的人</li>
					<li>附近动态</li>
					<li>附近服务</li>
				</ul>
				<img src="img/filtration.png" height="15px" class="filtrate">
				<img src="img/publish.png" class="camera" height="20px">
			</div>
		</div>
		<section style="margin-top: 90px">
			<!-- 附近的人页面 -->

			<div class="near">

				<!--<a href="html/dynamic.html" class="underlining">
					<div class="xs">
						<div class="flex">
							<div class="h-portrait">
								<img src="img/logo.png" width="50px">
							</div>
							<div class="user">
								<p class="username">美游新号</p>
								<p class="boy flex">
									<img src="img/female-s.png" height="7px"> 23
								</p>
								<p class="wz">春风十里不如你微微一笑</p>
							</div>
							<div class="flex xs-r">0.1km</div>
						</div>
					</div>
				</a>
				<a href="html/dynamic.html" class="underlining">
					<div class="xs">
						<div class="flex">
							<div class="h-portrait">
								<img src="img/logo.png" width="50px">
							</div>
							<div class="user">
								<p class="username">出了名的难哄</p>
								<p class="girl flex">
									<img src="img/female-s.png" height="7px"> 22
								</p>
								<p class="wz">你不来，我不走</p>
							</div>
							<div class="flex xs-r">0.3km</div>
						</div>
					</div>
				</a>-->
			</div>
			<!-- 附近动态页面 -->
			<div class="content-wrap">
				<div class="film" style="z-index:99">
					<div class="center">
						<div class="film-t">
							<p>拍摄</p>
							<p>照片或视频</p>
						</div>
						<a href="html/release.html" class="underlining">
							<div class="phone-s">从手机相册选择</div>
						</a>
						<div class="parting-line"></div>
						<div class="cancle">取消</div>
					</div>
				</div>
				<div class="content">

					<a href="html/details-infor.html" class="underlining">
						<div class="flex">
							<div class="h-portrait">
								<img src="img/logo.png" width="50px">
							</div>
							<div>
								<p class="username">小静静</p>
								<p class="girl flex">
									<img src="img/female-s.png" height="7px"> 23
								</p>
							</div>
						</div>
						<p class="wz">有在南山的朋友吗？</p>
						<div class="flex pic">
							<img src="img/logo.png">
						</div>
						<div class="flex xs-r">
							<p>0.1km</p>
							<img src="img/break.png" height="5px" class="break">
							<p>5分钟前</p>
							<img src="img/break.png" height="5px" class="break">
							<p>1080阅读</p>
						</div>
						<a href="html/report.html"><img src="img/report.png" class="report"></a>
					</a>
					<div class="flex xs-r">
						<div class="addlike">
							<img src="img/like-n.png" height="15px">
							<span>15</span>
						</div>
						<div>
							<img src="img/comment.png" height="15px">
							<span>6</span>
						</div>
						<div class="chat">
							<img src="img/chat.png" height="15px">
						</div>
					</div>
				</div>
				<div class="content">
					<a href="html/details-infor.html" class="underlining">
						<div class="flex">
							<div class="h-portrait">
								<img src="img/logo.png" width="50px">
							</div>
							<div>
								<p class="username">小静静</p>
								<p class="girl flex">
									<img src="img/female-s.png" height="7px"> 23
								</p>
							</div>
						</div>
						<p class="wz">有一起去看模特走秀的吗？</p>
						<div class="flex pic">
							<img src="img/logo.png">
						</div>
						<div class="flex xs-r">
							<p>0.8km</p>
							<img src="img/break.png" height="5px" class="break">
							<p>5分钟前</p>
							<img src="img/break.png" height="5px" class="break">
							<p>980阅读</p>
						</div>
						<a href="html/report.html"><img src="img/report.png" class="report"></a>
					</a>
					<div class="flex xs-r">
						<div class="addlike">
							<img src="img/like-n.png" height="15px">
							<span>10</span>
						</div>
						<div>
							<img src="img/comment.png" height="15px">
							<span>9</span>
						</div>
						<div class="chat">
							<img src="img/chat.png" height="15px">
						</div>
					</div>
				</div>
				<div class="content">
					<a href="html/details-infor.html" class="underlining">
						<div class="flex">
							<div class="h-portrait">
								<img src="img/logo.png" width="50px">
							</div>
							<div>
								<p class="username">我是你的小猫咪</p>
								<p class="girl flex">
									<img src="img/female-s.png" height="7px"> 23
								</p>
							</div>
						</div>
						<p class="wz">有人愿意来一场说走就走的旅行吗？</p>
						<div class="flex pic">
							<img src="img/logo.png">
							<img src="img/logo.png">
							<img src="img/logo.png">
							<img src="img/logo.png">
						</div>
						<div class="flex xs-r">
							<p>1.8km</p>
							<img src="img/break.png" height="5px" class="break">
							<p>9分钟前</p>
							<img src="img/break.png" height="5px" class="break">
							<p>780阅读</p>
						</div>
						<a href="html/report.html"><img src="img/report.png" class="report"></a>
					</a>
					<div class="flex xs-r">
						<div class="addlike">
							<img src="img/like-n.png" height="15px">
							<span>20</span>
						</div>
						<div>
							<img src="img/comment.png" height="15px">
							<span>18</span>
						</div>
						<div class="chat">
							<img src="img/chat.png" height="15px">
						</div>
					</div>
				</div>
			</div>
			<!-- 附近服务页面 -->
			<div class="service">
				<div id="banner-wrap">
					<span id="left"><</span>
					<span id="right">></span>
		    		<ul id="banner">
		    			<li><img src="img/carousel-l.png"></li>
		    			<li><img src="img/carousel-c.png"></li>
		    			<li><img src="img/carousel-r.png"></li>
		    		</ul>
		    		<ol>
		    			<li class="dot"></li>
		    			<li></li>
		    			<li></li>
		    		</ol>
		    	</div>
		    	<ul class="flex service-tab">
		    		<li>
		    			<a href="html/party.html">
		    				<img src="img/party.png">
		    				<p>聚会约会</p>
		    			</a>
		    		</li>
		    		<li>
		    			<a href="html/travel.html">
			    			<img src="img/travel.png">
			    			<p>结伴旅游</p>
			    		</a>
		    		</li>
		    		<li>
		    			<a href="html/club.html">
			    			<img src="img/club.png">
			    			<p>推拿会所</p>
		    			</a>
		    		</li>
		    		<li>
		    			<a href="html/guide.html">
			    			<img src="img/guide.png">
			    			<p>同城导游</p>
		    			</a>
		    		</li>
		    	</ul>
		    	<div class="parting-line"></div>
		    	<div class="club-wrap">
		    		<div class="flex club">
			    		<div class="h-portrait">
			    			<img src="img/logo.png" width="50px">
			    		</div>
						<div class="club-r">
							<p class="username">帝王会所</p>
							<p class="flex score">
								<img src="img/star-f.png" height="7px">
								<img src="img/star-f.png" height="7px">
								<img src="img/star-f.png" height="7px">
								<img src="img/star-f.png" height="7px">
								<img src="img/star-h.png" class="star">
								<span>4.5分</span>
							</p>
							<div class="flex distance">
								<p>按摩/足疗</p>
								<p>据我0.2km</p>
							</div>
						</div>
			    	</div>
			    	<div class="flex money">
			    		<div>
			    			<p class="blue">￥298</p>
			    			<p>门市价：<span>￥675</span></p>
			    		</div>
			    		<div>
			    			<p>单人肩部保养（70分钟）</p>
			    			<p>已售105</p>
			    		</div>
			    	</div>
		    	</div>
		    	<div class="parting-line"></div>
		    	<div class="club-wrap">
		    		<div class="flex club">
			    		<div class="h-portrait">
			    			<img src="img/logo.png" width="50px">
			    		</div>
						<div class="club-r">
							<p class="username">天缘会所</p>
							<p class="flex score">
								<img src="img/star-f.png" height="7px">
								<img src="img/star-f.png" height="7px">
								<img src="img/star-f.png" height="7px">
								<img src="img/star-f.png" height="7px">
								<img src="img/star-f.png" height="7px">
								<span>5.0分</span>
							</p>
							<div class="flex distance">
								<p>有停车位</p>
								<p>据我2.1km</p>
							</div>
						</div>
			    	</div>
			    	<div class="flex money">
			    		<div>
			    			<p class="blue">￥298</p>
			    			<p>门市价：<span>￥675</span></p>
			    		</div>
			    		<div>
			    			<p>单人肩部保养（70分钟）</p>
			    			<p>已售105</p>
			    		</div>
			    	</div>
			    	<div class="flex money">
			    		<div>
			    			<p class="blue">￥298</p>
			    			<p>门市价：<span>￥675</span></p>
			    		</div>
			    		<div>
			    			<p>单人肩部保养（70分钟）</p>
			    			<p>已售105</p>
			    		</div>
			    	</div>
		    	</div>
			</div>
		</section>
		<footer>
			<ul class="flex center clearfix">
				<li>
					<a href="#" class="active underlining">首页</a>
				</li>
				<li>
					<a href="html/message.html" class="underlining">消息</a>
				</li>
				<li>
					<a href="#" class="fabu"></a>
				</li>
				<li>
					<a href="html/zhuanqian.html"  class="underlining">赚钱</a>
				</li>
				<li>
					<a href="html/my.html"  class="underlining">我的</a>
				</li>
			</ul>
		</footer>

		<script src="js/jquery-3.3.1.js"></script>
		<script src="js/index.js"></script>
		<script src="js/my.js"></script>
<<<<<<< HEAD

       <script type="text/javascript">

            $.ajax({
            	type:'get',
            	url:"http://192.168.0.112:8080/meiyou/isLogin",
            	success:function(data){
            	   if(data.code==100){
            		   window.Android.loginSuccess();
            	   }else{
            		   window.Android.loginFail();
            	   }
            	}
            })

		
		
		        //启动加载 
		        $(function(){
		        	/* dynamicLoading(); */
		        });
		        
		        var weidu = "";
		        var jindu = "";
	
		        //调用高德第三方接口获取经纬度  
		         var map, geolocation;
                //加载地图，调用浏览器定位服务
                 map = new AMap.Map('', {
                    resizeEnable: true
                }); 
                map.plugin('AMap.Geolocation', function() {
                    geolocation = new AMap.Geolocation({
                        enableHighAccuracy: true, //是否使用高精度定位，默认:true
                        timeout: 10000, //超过10秒后停止定位，默认：无穷大
                        buttonOffset: new AMap.Pixel(10, 20), //定位按钮与设置的停靠位置的偏移量，默认：Pixel(10, 20)
                        zoomToAccuracy: true, //定位成功后调整地图视野范围使定位位置及精度范围视野内可见，默认：false
                        buttonPosition: 'RB'
                    });
                    map.addControl(geolocation);
                    geolocation.getCurrentPosition();
                    AMap.event.addListener(geolocation, 'complete', onComplete); //返回定位信息
                    AMap.event.addListener(geolocation, 'error', onError); //返回定位出错信息
                }); 
                //解析定位结果
                function onComplete(data) {
                	console.log(data);
                    weidu = data.position.getLat();   //纬度 
                    jindu = data.position.getLng();    //经度 
                   // alert(weidu+","+jindu);
                    dynamicLoading(weidu,jindu);
                }

                //解析定位错误信息
                function onError(data) {
                   // alert("定位失败");
                }
                
                //加载附近动态
                function dynamicLoading(weidu,jindu){
                	var uId = localStorage.getItem("uId");
    				var uPhone = localStorage.getItem("uPhone");
    			//	alert(uId+"||"+uPhone);
    				$.ajax({
                		url:"/meiyou/dongtai/selectdongtai",
                		type:"POST",
                		data:"jindu="+jindu+"&weidu="+weidu+"&phone="+uPhone,
                		success:function(data){
                			console.log(data);
                			if(data.code==100){
                				//显示信息
                				get_user_info(data);
                			}else{
                				//错误信息
                				
                			}
                		}
                	});
                }
                
                //请求获取用户信息 
                function get_user_info(data){
                	var list = data.extend.list;
                	$.each(list,function(i,item){
                		//查询用户信息 
                		if(item!=null){
                			var tUcount = item.tUcount;
                			//javascript:;("tUcount:"+tUcount);
                    		
                    		$.ajax({
                    			url:"/meiyou/dongtai/selectUserById",
                    			type:"POST",
                    			data:"uPhone="+tUcount,
                    			success:function(data){
                    				console.log(data);
                    				//展示信息
                    				show_user_info(item,data.extend.user);
                    			}
                    		});
                    		
                		}
                	});
                }
                
                //展示信息
                function show_user_info(dongtai,user){
                	/* console.log(dongtai);
                	console.log(user);
                	return false; */
                	var contentDiv = $('<div class="content"></div>');
                	//a标签
                	var a = $('<a href="html/details-infor.html" class="underlining"></a>');
                	var flexDiv = $('<div class="flex"></div>');
                	var uImg = user.uImg;
                	var divImg = $('<div><img src="'+uImg+'" width="50px"></div>');
                	var divP = $('<div></div>');
                	var uNameP = user.uName;
                	var usernameP = $('<p class="username"></p>').append(uNameP);
                	var uOld = user.uOld;
                    var girlflexP;
                	//判断男女 
                	if(user.uSex == "男"){
                		girlflexP = $('<p class="boy flex"></p>')
                    	.append($('<img src="img/female-s.png" height="7px" />')).append(uOld);
                	}else{
                		girlflexP = $('<p class="girl flex"></p>')
                    	.append($('<img src="img/female-s.png" height="7px" />')).append(uOld);
                	}
                	
                	divP.append(usernameP).append(girlflexP);
                	var reportImg = $('<img src="img/report.png" class="report">');
                	flexDiv.append(divImg).append(divP).append(reportImg);
                	var tContent = dongtai.tContent;
                	var wzp = $('<p class="wz"></p>').append(tContent);
                	var tImgorVideo = dongtai.tImgorVideo;
                	var flexpic = $('<div class="flex pic"><img src="'+tImgorVideo+'"></div>');
                	var flexxsr = $('<div class="flex xs-r"></div>');
                    var p1 = $('<p></p>').append(dongtai.juli+"KM");        //距离  
                    var img1 = $('<img src="img/break.png" height="5px" class="break">');
                    
                    //时间字符串截取
                    var time = dongtai.time;
                    var tYuedu = dongtai.tYuedu;
                    var p2 = $('<p></p>').append(time);        //时间   
                    var img2 = $('<img src="img/break.png" height="5px" class="break">');
                    var p3 = $('<p></p>').append(tYuedu+"阅读");     //阅读  
                    flexxsr.append(p1).append(img1).append(p2).append(img2).append(p3);
                    a.append(flexDiv).append(wzp).append(flexpic).append(flexxsr);
                    
                    var flexxs = $('<div class="flex xs-r"></div>');
                    var addlike = $('<div class="addlike"></div>');
                    var addlikeImg = $('<img src="img/like-n.png" height="15px"><span></span>').append(dongtai.dianzan);
                    addlike.append(addlikeImg);
                    var div1 = $('<div></div>');
                    var Img2 = $('<img src="img/comment.png" height="15px"><span></span>').append(dongtai.pinglunshu);
                    div1.append(Img2);
                    var chatdiv = $('<div class="chat"></div>');
                    var Img2 = $('<img src="img/chat.png" height="15px">');
                    chatdiv.append(Img2);
                    flexxs.append(addlike).append(div1).append(chatdiv);
                    contentDiv.append(a).append(flexxs);
                    $('#fujin').append(contentDiv);
                }

		</script>
=======
>>>>>>> branch 'master' of https://gitee.com/xiejun123/Meiyou.git
	</body>
</html>
<script>
	loadAction();
	//初始状态，加载数据
	function loadAction(){
		$.ajax({
			type:"get",
			url:"data/index.json",
			async:true,
			success:function  (data) {
				var val=data.books;
				var data_length = val.length;//数据的总长度
				for (var j = 0; j < data_length; j++) {
					var data1 = val[j];
					if (data1.sex == 1) {
						$(".near").append('<a href="html/dynamic.html" class="underlining">\n' +
								'<div class="xs">\n' +
								'<div class="flex">\n' +
								'<div class="h-portrait">\n' +
								"<img src='" + data1.imgUrl + "' width=\"50px\">" +
								'</div>\n' +
								'<div class="user">\n' +
								'<p class="username">' + data1.name + '</p>\n' +
								'<p class="girl flex">\n' +
								'<img src="img/male-s.png" height="7px">' + data1.age + '\n' +
								'</p>\n' +
								'<p class="wz">' + data1.content + '</p>\n' +
								'</div>\n' +
								'<div class="flex xs-r">' + data1.km + '</div>\n' +
								'</div>\n' +
								'</div>\n' +
								'</a>');
					}else {
						$(".near").append('<a href="html/dynamic.html" class="underlining">\n' +
								'<div class="xs">\n' +
								'<div class="flex">\n' +
								'<div class="h-portrait">\n' +
								"<img src='" + data1.imgUrl + "' width=\"50px\">" +
								'</div>\n' +
								'<div class="user">\n' +
								'<p class="username">' + data1.name + '</p>\n' +
								'<p class="boy flex">\n' +
								'<img src="img/female-s.png" height="7px">' + data1.age + '\n' +
								'</p>\n' +
								'<p class="wz">' + data1.content + '</p>\n' +
								'</div>\n' +
								'<div class="flex xs-r">' + data1.km + '</div>\n' +
								'</div>\n' +
								'</div>\n' +
								'</a>');
					}
				}

				}
		});
	}

$('.nav ul li:nth-child(2)').click(function () {
	$('.camera').show();
	$(this).siblings().click(function () {
		$('.camera').hide();
	})
})
</script>
